﻿using MyECommerceProject.Models;

namespace MyECommerceProject.Interfaces
{
    public interface IProductRepository
    {
        Task<IEnumerable<Product>> GetProductsAsync();
        Task<Product> GetProductByIdAsync(int productId);
        Task AddProductAsync(Product product);
        Task UpdateProductAsync(Product product);
        Task DeleteProductAsync(int productId);
        /// <summary>
        /// 根据前端传来的参数查询指定的商品
        /// </summary>
        /// <param name="option">一些参数说明</param>
        /// <returns></returns>
        Task<IEnumerable<Product>> GetProductsAsyncByOptionAsync(ProductSearchOption option);
    }
}
